﻿using Admin.NET.Core;
using Microsoft.AspNetCore.Http;
using MOKA.TPM.Entity;
using System.ComponentModel.DataAnnotations;

namespace MOKA.TPM.Application.Service.Dto;

/// <summary>
/// 页面输出参数 （）
/// </summary>
public class DepartmentOutput : Department
{
}

/// <summary>
/// 单ID查询参数
/// </summary>
public class DepartmentInput
{
    /// <summary>
    /// 部门ID
    /// </summary>
    public string? DepartmentId { get; set; }
}

/// <summary>
/// 普通查询参数
/// </summary>
public class GetDepartmentInput : BaseOrderInput
{
    public string? RootId { set; get; }
}

/// <summary>
/// 分页查询参数
/// </summary>
public class PageDepartmentInput : BasePageInput
{
}

/// <summary>
/// 新增记录参数
/// </summary>
public class AddDepartmentInput
{
    /// <summary>
    /// 部门ID
    /// </summary>
    [Required, MaxLength(50)]
    public string DepartmentId { get; set; } = string.Empty;

    /// <summary>
    /// 父部门ID
    /// </summary>
    [MaxLength(50)]
    public string? ParentId { get; set; }

    /// <summary>
    /// 部门名称
    /// </summary>
    [MaxLength(300)]
    public string? DepartmentName { get; set; }

    /// <summary>
    /// </summary>
    public int? IsValid { get; set; }
}

/// <summary>
/// 更新参数
/// </summary>
public class UpdateDepartmentInput
{
    /// <summary>
    /// 部门ID
    /// </summary>
    [MaxLength(50)]
    public string DepartmentId { get; set; }

    /// <summary>
    /// 父部门ID
    /// </summary>
    [MaxLength(50)]
    public string? ParentId { get; set; }

    /// <summary>
    /// 部门名称
    /// </summary>
    [MaxLength(300)]
    public string? DepartmentName { get; set; }

    /// <summary>
    /// </summary>
    public int? IsValid { get; set; }
}

/// <summary>
/// 删除参数
/// </summary>
public class DeleteDepartmentInput
{
    /// <summary>
    /// 部门ID
    /// </summary>
    public string DepartmentId { get; set; }
}

/// <summary>
/// 更新部分数据参数
/// </summary>
public class UpdateSomeDepartmentInput
{
    /// <summary>
    /// 部门ID
    /// </summary>
    public string DepartmentId { get; set; }
}